/*
 * Principal  
 * 
 * Versao 1.0
 * 
 * 25/05/2013
 * 
 * Autor: Bhetynna Catalunha
 * 
 */

package edu.Ufes.exeSwing.Boundary;

import edu.Ufes.exeSwing.Persistence.Agencias;

/**
 *
 * @author bhetynnacatalunha
 */
public class Principal extends javax.swing.JFrame {

    /**
     * Creates new form Principal
     */
    
    Agencias agencias; 
    
    public Principal(Agencias pAgencia) {
        initComponents();
        this.agencias = pAgencia;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuOpcoes = new javax.swing.JMenu();
        mnuAgencias = new javax.swing.JMenuItem();
        mnuGerentes = new javax.swing.JMenuItem();
        mnuDiretores = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Principal");

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/Ufes/exeSwing/Imagem/imgBanco.jpg"))); // NOI18N

        mnuOpcoes.setText("Opcoes");

        mnuAgencias.setText("Agencias");
        mnuAgencias.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuAgenciasActionPerformed(evt);
            }
        });
        mnuOpcoes.add(mnuAgencias);

        mnuGerentes.setText("Gerentes");
        mnuOpcoes.add(mnuGerentes);

        mnuDiretores.setText("Diretores");
        mnuOpcoes.add(mnuDiretores);

        jMenuBar1.add(mnuOpcoes);

        setJMenuBar(jMenuBar1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnuAgenciasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuAgenciasActionPerformed
        // TODO add your handling code here:
        TelaListarAgencia ag = new TelaListarAgencia();
        ag.setVisible(true);
    }//GEN-LAST:event_mnuAgenciasActionPerformed

   
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem mnuAgencias;
    private javax.swing.JMenuItem mnuDiretores;
    private javax.swing.JMenuItem mnuGerentes;
    private javax.swing.JMenu mnuOpcoes;
    // End of variables declaration//GEN-END:variables
}
